import com.demo.component.BeanLifeComponent;
import com.demo.controller.BeanScopesController;
import com.demo.controller.BeanScopesController1;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/2/26
 */
public class BeanLifeTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");
        BeanLifeComponent beanLifeComponent = context.getBean("beanLifeComponent",
                BeanLifeComponent.class);
        System.out.println("执⾏ main ⽅法");
        // 执⾏销毁⽅法
        context.destroy();
    }
}
